<?php
	class Add_sort extends Controller{
			function add_sort(){
				parent::Controller();
				$this->load->database();
				}
			function add_index(){
				$this->load->model('addproductmodel');
				$data=$this->addproductmodel->getSort();
				$getChild=$this->addproductmodel->getChildren($data,0,0);
				$data['child']=$getChild;
				$this->load->view('admin_addsort',$data);
				}
			function insert_sort(){
					$data=array(
									'title'=>$_POST['title'],
									'pid'=>$_POST['sortid'],
									'order'=>$_POST['order'],
								
								);
					print_r($data);
					$this->load->model('add_sortmodel');
					$this->add_sortModel->insert_sort($data);
					
				}
		}

?>